package com.flyduck.vueshop.order.remote.service.impl;

import com.flyduck.vueshop.common.core.utils.BeanUtils;
import com.flyduck.vueshop.order.entity.AppOrder;
import com.flyduck.vueshop.order.mapper.AppOrderMapper;
import com.flyduck.vueshop.order.remote.service.RemoteOrderService;
import com.flyduck.vueshop.order.vo.RemoteOrderRespVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * <p>
 * RemoteOrderServiceImpl
 * </p>
 *
 * @author flyduck
 * @since 2024-07-23
 */
@Service
public class RemoteOrderServiceImpl implements RemoteOrderService {

    @Resource
    private AppOrderMapper appOrderMapper;

    @Override
    public RemoteOrderRespVO getOrderById(Long id) {
        AppOrder appOrder = appOrderMapper.selectById(id);
        return BeanUtils.toBean(appOrder, RemoteOrderRespVO.class);
    }
}
